function calc_price_all() {
	var price_all = 0;
	$('.each').each(function(i){
		price_all = price_all + parseInt($(this).val());
	});
	$('#price_all').html(price_all);
}
function change_payment(id) {
	$('.shipping .inner input').attr('disabled', 'disabled');
	$('.shipping .inner img.enabled').hide();
	$('.shipping .inner img.disabled').show();
	$('.shipping .inner .for_payment_'+id).each(function(i){
		$(this).find('input').removeAttr('disabled');
		$(this).find('img.disabled').hide();
		$(this).find('img.enabled').show();
	});
}

$(function(){
	/// 绑定Payment切换事件 ///
	$('.payment .inner input').click(function(){
		change_payment($(this).val());
	});
	/// 触发一次Payment切换 ///
	$('.payment .inner input:checked').trigger('click');
	/// 绑定Shipping切换事件 ///
	$('.shipping .inner input').click(function(){
		$('#price_ship').html($(this).attr('rel'));
	});
	/// 计算总价 ///
	calc_price_all();
});
